package com.miracle.blog.controller;


import com.miracle.blog.dto.UserMenuDTO;
import com.miracle.blog.service.MenuService;
import com.miracle.blog.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 *
 * 菜单Controller
 * */
@Api(tags = "菜单模块")
@RestController
public class MenuController {

    @Autowired
    MenuService menuService;

    @ApiOperation(value = "查看当前用户菜单")
    @GetMapping("/admin/user/menus")
    public Result<List<UserMenuDTO>> listUserMenus(){
        return Result.ok(menuService.listUserMenus());
    }
}
